#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,m,index=0;
    string s;
    cin>>n;
    cin.ignore(numeric_limits<streamsize>::max(), '\n');
    getline(cin,s);
    m=ceil(s.size()*1.0/n);

    char arr[n+5][m+5];
    for (int j = m; j > 0; --j)
        for (int i = 1; i <= n; ++i) {
            if (index>=s.size())
                arr[i][j]=' ';
            else
                arr[i][j] = s[index++];
        }

    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= m; ++j)
            cout << arr[i][j];
        cout << endl;
    }
    return 0;
}